//package com.ruoyi.product.controller;
//
//import java.util.List;
//
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import jakarta.servlet.http.HttpServletResponse;
//import org.springframework.security.access.prepost.PreAuthorize;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.PutMapping;
//import org.springframework.web.bind.annotation.DeleteMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import com.ruoyi.common.annotation.Log;
//import com.ruoyi.common.core.controller.BaseController;
//import com.ruoyi.common.core.domain.AjaxResult;
//import com.ruoyi.common.enums.BusinessType;
//import com.ruoyi.product.domain.ProductActivity;
//import com.ruoyi.product.service.IProductActivityService;
//import com.ruoyi.common.utils.poi.ExcelUtil;
//import com.ruoyi.common.core.page.TableDataInfo;
//
///**
// * 活动Controller
// *
// * @author liuhuizhong
// * @date 2025-08-13
// */
//@RestController
//@RequestMapping("/product/productActivity")
//@Tag(name = "活动管理接口", description = "提供活动操作")
//public class ProductActivityController extends BaseController
//{
//    @Autowired
//    private IProductActivityService productActivityService;
//
//    /**
//     * 查询活动列表
//     */
//    @PreAuthorize("@ss.hasPermi('product:productActivity:list')")
//    @GetMapping("/list")
//    @Operation(summary = "查询活动列表", description = "传入活动查询对象，返回活动列表")
//    public TableDataInfo list(ProductActivity productActivity)
//    {
//        startPage();
//        List<ProductActivity> list = productActivityService.selectProductActivityList(productActivity);
//        return getDataTable(list);
//    }
//
//    /**
//     * 导出活动列表
//     */
//    @PreAuthorize("@ss.hasPermi('product:productActivity:export')")
//    @Log(title = "活动", businessType = BusinessType.EXPORT)
//    @PostMapping("/export")
//    public void export(HttpServletResponse response, ProductActivity productActivity)
//    {
//        List<ProductActivity> list = productActivityService.selectProductActivityList(productActivity);
//        ExcelUtil<ProductActivity> util = new ExcelUtil<ProductActivity>(ProductActivity.class);
//        util.exportExcel(response, list, "活动数据");
//    }
//
//    /**
//     * 获取活动详细信息
//     */
//    @PreAuthorize("@ss.hasPermi('product:productActivity:query')")
//    @GetMapping(value = "/{activityId}")
//    public AjaxResult getInfo(@PathVariable("activityId") Long activityId)
//    {
//        return success(productActivityService.selectProductActivityByActivityId(activityId));
//    }
//
//    /**
//     * 新增活动
//     */
//    @PreAuthorize("@ss.hasPermi('product:productActivity:add')")
//    @Log(title = "活动", businessType = BusinessType.INSERT)
//    @PostMapping
//    public AjaxResult add(@RequestBody ProductActivity productActivity)
//    {
//        return toAjax(productActivityService.insertProductActivity(productActivity));
//    }
//
//    /**
//     * 修改活动
//     */
//    @PreAuthorize("@ss.hasPermi('product:productActivity:edit')")
//    @Log(title = "活动", businessType = BusinessType.UPDATE)
//    @PutMapping
//    public AjaxResult edit(@RequestBody ProductActivity productActivity)
//    {
//        return toAjax(productActivityService.updateProductActivity(productActivity));
//    }
//
//    /**
//     * 删除活动
//     */
//    @PreAuthorize("@ss.hasPermi('product:productActivity:remove')")
//    @Log(title = "活动", businessType = BusinessType.DELETE)
//	@DeleteMapping("/{activityIds}")
//    public AjaxResult remove(@PathVariable Long[] activityIds)
//    {
//        return toAjax(productActivityService.deleteProductActivityByActivityIds(activityIds));
//    }
//
//    @GetMapping("/carouselList")
//    @Operation(summary = "首页轮播图列表", description = "")
//    public TableDataInfo carouselList()
//    {
//        List<ProductActivity> list = productActivityService.selectProductActivityList(null);
//        return getDataTable(list);
//    }
//}
